import request from '@/utils/request'

// 查询专题成果列表
export function listZhuanTiChengGuo(query) {
  return request({
    url: '/archive/zt/achievement/list',
    method: 'get',
    params: query
  })
}

// 查询专题成果详细
export function getZhuanTiChengGuo(chengguoId) {
  return request({
    url: '/archive/zt/achievement/' + chengguoId,
    method: 'get'
  })
}

// 新增专题成果
export function addZhuanTiChengGuo(data) {
  return request({
    url: '/archive/zt/achievement',
    method: 'post',
    data: data
  })
}

// 修改专题成果
export function updateZhuanTiChengGuo(data) {
  return request({
    url: '/archive/zt/achievement',
    method: 'put',
    data: data
  })
}

// 删除专题成果
export function delZhuanTiChengGuo(chengguoId) {
  return request({
    url: '/archive/zt/achievement/' + chengguoId,
    method: 'delete'
  })
}

// 成果下载
export function downloadZhuanTiChengGuo(chengguoId) {
  return request({
    url: '/archive/zt/achievement/download/' + chengguoId,
    method: 'get'
  })
}

// 修改发布状态
export function editState(data) {
  return request({
    url: '/archive/zt/achievement/editState?ids='+data.ids+"&state="+data.state,
    method: 'put'
  })
}

// 获取文件列表
export function getFile(query) {
  return request({
    url: '/archive/zt/achievement/file/list',
    method: 'post',
    params: query
  })
}

// 删除电子文件
export function removeFile(query) {
  return request({
    url: '/archive/zt/achievement/file/remove',
    method: 'post',
    params: query
  })
}

